import request from '@/utils/request';

/**
 * @description 工单查询 查询列表
 */
export const remoteList = params => {
    return request.get('/sys/workorder/query', params);
};

/**
 * @description 层级查询 查询列表
 */
export const remoteQueryNodeList = params => {
    return request.get('/sys/workorder/queryNode', params);
};

/**
 * 工单新增 添加
 */
export const addWorkInfo = data => {
    return request.post('/sys/workorder/insert', data);
};

/**
 * 工单更新
 */
export const updateWorkInfo = data => {
    return request.post('/sys/workorder/update', data);
};

/**
 * 层级新增 添加
 */
export const addNodeInfo = data => {
    return request.post('/sys/workorder/insertNode', data);
};
/**
 * 层级更新 添加
 */
export const updateNodeInfo = data => {
    return request.post('/sys/workorder/updateNode', data);
};


/**
 * 工单删除 删除
 */
export const deleteInfo = data =>{
    return request.post(`/sys/workorder/delete`,data)
}
/**
 * 层级删除 删除
 */
export const deleteNodeInfo = data =>{
    return request.post(`/sys/workorder/deleteNode`,data)
}

/**
 * 工单和层级同时创建接口
 */
export const insertOrderNode = data=>{
    return request.post(`/sys/workorder/insertOrderNode`,data)
}

/**
 * 工单和层级同时更新接口
 */
export const updateOrderNode = data=>{
    return request.post(`/sys/workorder/updateOrderNode`,data)
}


export default{
    remoteList
}